<?php


    	$mysql = new SaeMysql();
		
        if($_POST[name]==""||$_POST[gender]==""||$_POST[telephone]==""||$_POST[work]=="")
        
        {
            echo "当前操作，加入大家庭失败！";
        }
        else
        {
        	$sql = "insert into dan(name,gender,telephone,work) values ('$_POST[name]','$_POST[gender]','$_POST[telephone]','$_POST[work]')";
        }

		if($mysql->runSql($sql)>0){
            echo "<h3>欢迎 ";
            echo $_POST[name];
            echo ",<br/>成功加入大家庭啦!";
            echo "</h3>";
		}


		if ($mysql->errno() != 0)
		{
   			die("Error:" . $mysql->errmsg());
		}

		$mysql->closeDb();

?>

<?php
		require_once('init.php');
?>

<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta name="author" content="titan52"/>
<!-- Bootstrap core css-->
<link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link href="/assets/main.css" rel="stylesheet">
<title>丹丹和小伙伴的聚会</title>
    
<body>
    <section id="superhero">
        <div class="form-item">
            <img class="img-circle" src="assets/logo.png" width="180" height="180">
        </div>
    	<div class="form-item">
        	<h3>聚会当日可向我索取通讯录！</h3>
        </div>
        <!-- 支付页面地址
        <div class="form-item">
        	<a href="/test.html" class="button pink serif skew glossy">进入支付流程</a>
        </div>
		-->
</section>
    </body>

    
    <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    
</html>
